Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLDR-17425 Fix bugs involving locale USER #3572

Merged
merged 1 commit into from
Mar 21, 2024
Merged

Conversation

btangmu
Copy link
Member

@btangmu btangmu commented Mar 20, 2024

-Include real locale ID as json.loc in server response for page request

-Use optional chaining (?.) operator for special_type which may be undefined for USER

-Do not call dispatchEvent or setRef from setCurrentLocale for locale USER

-New method UserRegistry.substituteUserWildcardLocale replacing inline code in SurveyAjax, now called also by VoteAPIHelper

CLDR-17425

  • This PR completes the ticket.

ALLOW_MANY_COMMITS=true

-Include real locale ID as json.loc in server response for page request

-Use optional chaining (?.) operator for special_type which may be undefined for USER

-Do not call dispatchEvent or setRef from setCurrentLocale for locale USER

-New method UserRegistry.substituteUserWildcardLocale replacing inline code in SurveyAjax, now called also by VoteAPIHelper
@btangmu btangmu self-assigned this Mar 20, 2024
@btangmu btangmu requested review from srl295, AEApple and macchiati March 20, 2024 14:54
@@ -1055,21 +1055,7 @@ public static CLDRLocale validateLocale(PrintWriter out, String loc, String sess
* loc can have either - or _; normalize to _
*/
loc = loc.replace('-', '_');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need this line ? or maybe it should also go into a utility function?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we have to assume it's needed... ideally it should be encapsulated in a module specific to locales, not SurveyAjax; and as much as possible we should pass around CLDRLocale objects instead of strings...

Copy link
Member

@srl295 srl295 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks.. nice !

@btangmu btangmu merged commit c7e39f1 into unicode-org:main Mar 21, 2024
11 checks passed
@btangmu btangmu deleted the t17425_a branch March 21, 2024 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants